﻿using System;
using System.ComponentModel;
using System.Text.RegularExpressions;
using System.Windows.Controls;
using System.Windows.Data;

namespace Cryomancer.StarChart
{
	/// <summary>
	/// Interaction logic for VSPChartDetailCtrl.xaml
	/// </summary>
	public partial class VSPChartDetailCtrl : UserControl
	{
		#region Members
		private VSPChartDetail detailData;
		#endregion

		#region Properties
		/// <summary>
		/// Gets or sets the detail display object
		/// </summary>
		public VSPChartDetail Detail
		{
			get
			{
				return this.detailData;
			}
			set
			{
				SetDetailData(value);
			}
		}

		#endregion

		#region C'Tors and object lifetime code
		public VSPChartDetailCtrl()
		{
			InitializeComponent();

			this.detailData = new VSPChartDetail();
			this.detailData.PropertyChanged += new PropertyChangedEventHandler(DetailData_PropertyChanged);
		}
		#endregion

		#region Methods
		private void SetDetailData(VSPChartDetail detailData)
		{
			if (this.detailData == detailData)
			{
				return;
			}

			this.detailData                  = detailData;
			this.gridMain.DataContext        = detailData;
			this.detailData.PropertyChanged += new PropertyChangedEventHandler(DetailData_PropertyChanged);
		}
		#endregion

		#region Event Handlers
		private void DetailData_PropertyChanged(object sender, PropertyChangedEventArgs e)
		{
			
		}
		#endregion
	}
}
